//
//  YLExchangeRecordHeaderView.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/11.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLExchangeRecordHeaderView.h"
#import <Masonry.h>
#import "YLGlobeHeader.h"

@interface YLExchangeRecordHeaderView()
@property (nonatomic, weak) UILabel *titleLabel;
@property (nonatomic, weak) UILabel *numberLabel;

@end

@implementation YLExchangeRecordHeaderView
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUp];
    }
    return self;
}


- (void)setUp
{
    self.backgroundColor = [UIColor whiteColor];
    __weak typeof(self) weakSelf = self;
    UILabel *titleLabel = [[UILabel alloc] init];

    _titleLabel = titleLabel;
    titleLabel.textColor = YLGayColor;
    [self addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(weakSelf).mas_offset(15);
        make.centerY.mas_equalTo(weakSelf);
    }];
    
    UILabel *numberLabel = [[UILabel alloc] init];
    _numberLabel = numberLabel;
    numberLabel.textColor = YLMainColor;
    [self addSubview:numberLabel];
    [numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(weakSelf);
        make.right.mas_equalTo(weakSelf).mas_offset(-15);
    }];
    
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = [UIColor blackColor];
    line.alpha = 0.1;
    [self addSubview:line];
    
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(1);
        make.left.right.bottom.mas_equalTo(weakSelf);
    }];
}

- (void)setShowTitle:(NSString *)showTitle
{
    _showTitle = showTitle;
    _titleLabel.text = showTitle;
}

- (void)setTotalNeetPoint:(NSString *)totalNeetPoint
{
    _totalNeetPoint = totalNeetPoint;
    _numberLabel.text = totalNeetPoint;
}


@end
